@inject IStringLocalizer<SharedResource> L

<MudDialog>
    <TitleContent>
        <MudText Typo="Typo.h6">
            <MudIcon Icon="@Icons.Material.Filled.Delete" Class="mr-3 mb-n1" />
            @L["Delete Confirmation"]
        </MudText>
    </TitleContent>
    <DialogContent>
        <MudText>@ContentText</MudText>
    </DialogContent>
    <DialogActions>
        <MudButton StartIcon="@Icons.Filled.Cancel" OnClick="Cancel">@L["Cancel"]</MudButton>
        <MudButton StartIcon="@Icons.Filled.Delete" Color="Color.Error" Variant="Variant.Filled" OnClick="Submit">@L["Confirm"]</MudButton>
    </DialogActions>
</MudDialog>

@code {
    [CascadingParameter]
    MudDialogInstance MudDialog { get; set; } = default!;

    [Parameter]
    public string? ContentText { get; set; }

    void Submit()
    {
        MudDialog.Close(DialogResult.Ok(true));
    }
    void Cancel() => MudDialog.Cancel();
}
